package Liczbens;
import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;


public class LiczbaTest4 {

	private String a;
	private int b;

	@Before
	public void setUp() throws Exception {
		a = "10";
		b = 3;
	}
	
	@Test
	public void test()
	{
        try{
            Liczba x = new Liczba(a,b);
            Liczba laniewody = x;
            
            assertEquals("LanieWody",x,laniewody);
            assertTrue("Base", b < 17);
            assertFalse("Base", b < 2);
            assertNotNull("Liczba pusta?",x);
            
            for(int j = 2 ; j <= 16 ; j ++)
            {
                try{
                    System.out.println(j + ": " + x.zapis(j));
                }
                catch(LiczbaException le2){
                	fail("Bad input");
                    //System.out.println( le2.getMessage() );
                    //continue;
                }
            }
            System.out.println("");
        }
        catch(LiczbaException le1){
        	fail("Bad input");
            System.out.println( le1.getMessage() );
            System.out.println("");
        }
	}

}
